<!--{template web/header.html}-->

        <script type="text/javascript" src="{JS_URL}/web/script.js" ></script>
        
        <script type="text/javascript" src="{JS_URL}/web/compare_new.js"></script>
        <div class="block clearfix">
                当前位置: <a href="{APP_URL}/index.php">首页</a>
                {loop $cat_name_array $k $v}
                 <code>&gt;</code> <a href="{APP_URL}/index.php/article/index/cat_id/{$k}.shtml">{$v}</a>
                {/loop}
                <!--<div class="goods_line"></div>-->
                <div class="blank5"></div>
                <div id="goodsInfo clearfix">
                    <div id="scroll_up">
                        <div class="s_up" onmouseover="" onmousedown="" onmouseup="" onmouseout=""></div>
                        <div class="img_pic">
                            <div style="height: 420px;" id="demo">
                                <div id="demo1" style="float: left; height: 400px;">
                                    <ul>
                                        {loop $gallery_array $k $v}
                                        <li><a href="{$v['img_url']}" class='cloud-zoom-gallery' rel="useZoom:'CZoom', smallImage: '{$v['img_url']}'" title="{$v['img_desc']}"><img src="{$v['thumb_url']}" alt="{$v['img_desc']}"></a></li>
                                        {/loop}
                                    </ul>
                                </div>
                                <div id="demo2" style="display: inline; overflow: visible; height: 400px;"></div>
                            </div>
                        </div>
                        <div class="s_down" onmouseover="" onmousedown="" onmouseup="" onmouseout=""></div>

                        <script>
                            $(document).ready(function(){
                                $("#demo img").mouseover(function(){
                                    $("#demo img").removeClass("cur");
                                    $(this).addClass("cur");
                                });
                            });
                            /*
                            function $gg(id){
                                return (document.getElementById) ? document.getElementById(id): document.all[id]
                            }
                            var boxheight=90;//跟图片的实际尺寸相符
                            var box=$gg("demo");
                            var obox=$gg("demo1");
                            var dulbox=$gg("demo2");
                            obox.style.height=obox.getElementsByTagName("li").length*boxheight+'px';
                            dulbox.style.height=obox.getElementsByTagName("li").length*boxheight+'px';
                            box.style.height=obox.getElementsByTagName("li").length*boxheight*1+'px';
                            var canroll = false;
                            if (obox.getElementsByTagName("li").length >= 4) {
                                canroll = true;
                                dulbox.innerHTML=obox.innerHTML;
                            }
                            var step=5;temp=1;speed=50;
                            var aheight=obox.offsetHeight;
                            var mData=0;
                            var isStop = 1;
                            var dir = 1;
                            function s(){
                                if (!canroll) return;
                                if (dir) {
                                    if((aheight+mData)>=0)
                                    {
                                        mData=mData-step;
                                    }
                                    else
                                    {
                                        mData=-step;
                                    }
                                } else {
                                    if(mData>=0)
                                    {
                                        mData=-aheight;
                                    }
                                    else
                                    {
                                        mData+=step;
                                    }
                                }
                                obox.style.marginTop=mData+"px";
                                if (isStop) return;
                                setTimeout(s,speed)
                            }
                            function moveUp() {
                                var wasStop = isStop;
                                dir = 1;
                                speed = 50;
                                isStop=0;
                                if (wasStop) {
                                    setTimeout(s,speed);
                                }
                            }
                            function moveDown() {
                                var wasStop = isStop;
                                dir = 0;
                                speed = 50;
                                isStop=0;
                                if (wasStop) {
                                    setTimeout(s,speed);
                                }
                            }
                            function scrollStop() {
                                isStop=1;
                            }
                            function clickUp() {
                                var wasStop = isStop;
                                dir = 1;
                                speed = 25;
                                isStop=0;
                                if (wasStop) {
                                    setTimeout(s,speed);
                                }
                            }
                            function clickDown() {
                                var wasStop = isStop;
                                dir = 0;
                                speed = 25;
                                isStop=0;
                                if (wasStop) {
                                    setTimeout(s,speed);
                                }
                            }*/
                        </script>
                        <div style="clear:both;"></div>
                    </div>

                    <div class="goods_pics">
                        <div class="goods_big_img">
                            <a id="CZoom" class="cloud-zoom" href="{$gallery_array[0]['img_url']}" rel="zoomWidth:320,zoomHeight:360,position:'right',adjustX: 10,adjustY:-4,showTitle:false"><img src="{$gallery_array[0]['img_url']}" alt="{$gallery_array[0]['img_desc']}" class="thumb"  title="{$gallery_array[0]['img_desc']}" /></a>
                        </div>

                        <div style="height: 20px; line-height: 20px; text-align: right; vertical-align: middle;"><a href={$gallery_array[0]['img_url']}" target="_blank"><img src="{IMG_URL}/web/fdj.jpg" alt="放大查看" style="margin-top: 5px;"></a></div>
                        <div style="clear:both;"></div>
                    </div>
                    <div class="textInfo">
                        <form action="javascript:addToCart(152)" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
                            <div class="goods_t">
                                <p class="f_l">{$data['product_name']}</p>
                                <p class="f_r">
                                    <a href="goods.php-id=151">下一个</a>      </p>
                            </div>
                            <ul>
                                <li class="clearfix">
                                    <dd class="ddL"><strong>货号：</strong>{$data['product_sn']}</dd>
                                    <dd class="ddR"></dd>
                                </li>

                                <li class="clearfix">
                                    <dd class="ddL"><strong>库存：</strong>{$data['nums']}</dd>
                                    <dd class="ddR"><strong>重量：</strong>0克</dd>
                                </li>

                                <li class="clearfix">
                                    <dd class="ddL"><strong>点击数：</strong>273</dd>
                                    <dd class="ddR"><strong>上架时间：</strong>{echo date('Y-m-d',$data['create_time'])}</dd>
                                </li>

                                <li class="clearfix">
                                    <dd style="line-height:25px;" class="ddL"><strong>市场价格：</strong><font class="f_market">￥{$data['market_price']}元</font></dd>
                                    <dd class="ddR">
                                        <a href="javascript:collect(152)"><img src="{IMG_URL}/web/zcred.gif" /></a>
                                        <a href="user.php-act=affiliate&goodsid=152"><img src="{IMG_URL}/web/tjred.gif" /></a>
                                    </dd>
                                    <dd style="line-height:28px;">
                                        售价：<font class="price" id="ECS_SHOPPRICE">￥{$data['shop_price']}元</font>&nbsp;&nbsp;&nbsp;&nbsp;
                                        会员：<font class="price" id="ECS_RANKPRICE_1">￥{$data['member_price']}元</font>&nbsp;&nbsp;&nbsp;&nbsp;
                                    </dd>
                                </li>


                                <li class="padd loop clearfix">
                                    <strong>尺码:</strong> <span id="msg_211" style="color:#A10000; font-weight:bold;"></span><br />

                                    <div class="catt" id="catt_211">

                                        <a class="cattsel" style="cursor:pointer;" name="930" title=" ￥0.00元" rel="M">M <input style="display:none" id="spec_value_930" type="radio" name="spec_211" value="930" checked /></a>

                                        <a  style="cursor:pointer;" name="931" title=" ￥0.00元" rel="L">L <input style="display:none" id="spec_value_931" type="radio" name="spec_211" value="931"  /></a>

                                        <a  style="cursor:pointer;" name="932" title=" ￥0.00元" rel="XL">XL <input style="display:none" id="spec_value_932" type="radio" name="spec_211" value="932"  /></a>

                                        <a  style="cursor:pointer;" name="933" title=" ￥0.00元" rel="XXL">XXL <input style="display:none" id="spec_value_933" type="radio" name="spec_211" value="933"  /></a>
                                        <script language="javascript" type="text/javascript">
                                            $(function(){
                                                $("#catt_211>a").click(function(){
                                                    $(":radio",this).attr("checked",true);
                                                    $("#catt_211>a").removeClass('cattsel');
                                                    $(this).addClass('cattsel');
                                                    changePrice();
                                                });

                                                $("#msg_211").html($("#catt_211 a.cattsel").attr('rel'));
                                                $("#catt_211 a").click(function(){
                                                    $("#msg_211").html(this.rel);
                                                });
                                            });
                                        </script>
                                    </div>
                                    <input type="hidden" name="spec_list" value="3" />
                                </li>

                                <li class="padd loop clearfix">
                                    <div class="catt" id="color_link">
                                        <strong>颜色:</strong> <span id="colorpick" style="color:#A10000; font-weight:bold;"></span><br />
                                        <a  style="cursor:pointer; padding:2px;_width:120px;" title="" href="goods.php-id=149" rel="粉色"><div style="background-color:#EDC3CF; width:50px; height:50px; float:left;"></div><p>粉色</p></a>
                                        <a  style="cursor:pointer; padding:2px;_width:120px;" title="" href="goods.php-id=150" rel="天蓝色"><div style="background-color:#C0CFEC; width:50px; height:50px; float:left;"></div><p>天蓝色</p></a>
                                        <a  style="cursor:pointer; padding:2px;_width:120px;" title="" href="goods.php-id=151" rel="青苹果色"><div style="background-color:#D8E7BC; width:50px; height:50px; float:left;"></div><p>青苹果色</p></a>
                                        <a class="cattsel" style="cursor:pointer; padding:2px;_width:120px;" title="珠光按扣休闲衬衫情侣款（男款） 藏蓝色" href="goods.php-id=152" rel="藏蓝色"><div style="background-color:#9199A6; width:50px; height:50px; float:left;"></div><p>藏蓝色</p></a>
                                    </div>
                                </li>
                                <script language="javascript" type="text/javascript">
                                    $(function(){
                                        var chk_color = $('#color_link>a.cattsel').attr('rel');
                                        $('#colorpick').html(chk_color);
                                    });
                                </script>

                                <li class="clearfix goodsBuyBox">
                                    <dd class="ddL">购买数量：<input name="number" type="text" id="number" value="1" size="4" onblur="changePrice()" style="border:1px solid #ccc; "/></dd>
                                    <dd class="ddC">商品总价：<font id="ECS_GOODS_AMOUNT" class="f_shop" style="font-weight:bold;"></font></dd>
                                    <dd class="ddR"><a href="javascript:addToCart(152)"><img src="{IMG_URL}/web/btn_cart.gif" /></a></dd>
                                </li>

                                <li>
                                    <strong>用户评价：</strong>
                                    <img src="{IMG_URL}/web/stars5.gif" alt="comment rank 5" />
                                </li>

                            </ul>
                        </form>
                    </div>

                    <script type="text/javascript">
                        var goods_id = 152;
                        var goodsattr_style = 1;
                        var gmt_end_time = 0;
                        var day = "天";
                        var hour = "小时";
                        var minute = "分钟";
                        var second = "秒";
                        var end = "结束";
                        var goodsId = 152;
                        var now_time = 1304419331;
                        onload = function(){
                            changePrice();
                            fixpng();
                            try {onload_leftTime();}
                            catch (e) {}
                        }
                        /**
                         * 点选可选属性或改变数量时修改商品价格的函数
                         */
                        function changePrice()
                        {
                            var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
                            var qty = document.forms['ECS_FORMBUY'].elements['number'].value;
                            Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty, changePriceResponse, 'GET', 'JSON');
                        }
                        /**
                         * 接收返回的信息
                         */
                        function changePriceResponse(res)
                        {
                            if (res.err_msg.length > 0)
                            {
                                alert(res.err_msg);
                            }
                            else
                            {
                                document.forms['ECS_FORMBUY'].elements['number'].value = res.qty;
                                if (document.getElementById('ECS_GOODS_AMOUNT'))
                                    document.getElementById('ECS_GOODS_AMOUNT').innerHTML = res.result;
                            }
                        }
                    </script>
                    <div class="blank"></div>
                </div>
                <div class="blank"></div>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <script type="text/javascript">
                    function $id(element) {
                        return document.getElementById(element);
                    }
                    //切屏--是按钮，_v是内容平台，_h是内容库
                    function reg(str){
                        var bt=$id(str+"_b").getElementsByTagName("h2");
                        for(var i=0;i<bt.length;i++){
                            bt[i].subj=str;
                            bt[i].pai=i;
                            bt[i].style.cursor="pointer";
                            bt[i].onclick=function(){
                                $id(this.subj+"_v").innerHTML=$id(this.subj+"_h").getElementsByTagName("blockquote")[this.pai].innerHTML;
                                for(var j=0;j<$id(this.subj+"_b").getElementsByTagName("h2").length;j++){
                                    var _bt=$id(this.subj+"_b").getElementsByTagName("h2")[j];
                                    var ison=j==this.pai;
                                    _bt.className=(ison?"":"h2bg");
                                }
                            }
                        }
                        $id(str+"_h").className="none";
                        $id(str+"_v").innerHTML=$id(str+"_h").getElementsByTagName("blockquote")[0].innerHTML;
                    }
                </script>
                <div class="tab_navs">
                    <h3 class="H2bg">
                        <div id="com_b" class="history clearfix">
                            <h2 style="cursor: pointer;"><font>商品描述：</font></h2>
                            <h2 style="cursor: pointer;" class="h2bg"><font>商品属性</font></h2>
                            <h2 style="cursor: pointer;" class="h2bg"><font>商品标签</font></h2>
                        </div>
                    </h3>

                    <div id="com_v" class="boxCenterList RelaArticle"></div>
                    <div id="com_h">
                        <blockquote>
                            <p><span class="Apple-style-span">{$data['content']}</span></p>
                        </blockquote>
                        <blockquote>
                            <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#dddddd">
                                <tr>
                                    <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
                                </tr>
                            </table>
                        </blockquote>
                        <blockquote>
                            <form name="tagForm" action="javascript:;" onSubmit="return submitTag(this)" id="tagForm">
                                <p id="ECS_TAGS" style="margin-bottom:5px;">
                                </p>
                                <p>
                                    <input type="text" name="tag" id="tag" class="txt_style_1" size="35" />
                                    <input type="submit" value="添 加" class="btn_style_1" />
                                    <input type="hidden" name="goods_id" value="152"  />
                                </p>
                                <script type="text/javascript">
                                    //<![CDATA[

                                    /**
                                     * 用户添加标记的处理函数
                                     */
                                    function submitTag(frm)
                                    {
                                        try
                                        {
                                            var tag = frm.elements['tag'].value;
                                            var idx = frm.elements['goods_id'].value;
                                            if (tag.length > 0 && parseInt(idx) > 0)
                                            {
                                                Ajax.call('user.php?act=add_tag', "id=" + idx + "&tag=" + tag, submitTagResponse, "POST", "JSON");
                                            }
                                        }
                                        catch (e) {alert(e);}
                                        return false;
                                    }
                                    function submitTagResponse(result)
                                    {
                                        var div = document.getElementById('ECS_TAGS');
                                        if (result.error > 0)
                                        {
                                            alert(result.message);
                                        }
                                        else
                                        {
                                            try
                                            {
                                                div.innerHTML = '';
                                                var tags = result.content;
                                                for (i = 0; i < tags.length; i++)
                                                {
                                                    div.innerHTML += '<a href="search.php-keywords='+tags[i].word+'" style="color:#666; font-size:14px; font-weight:bold; line-height:36px; padding:5px; border:#b4b4b4 solid 1px; background-color:#e8f1f7; margin:5px;">' +tags[i].word + '[' + tags[i].count + ']<\/a>&nbsp;&nbsp; ';
                                                }
                                            }
                                            catch (e) {alert(e);}
                                        }
                                    }

                                    //]]>
                                </script>
                            </form>
                        </blockquote>
                    </div>
                </div>
                <script type="text/javascript">
                    <!--
                    reg("com");
                    //-->
                </script>
                <div class="blank"></div>
                <div class="layout_2">
                    <div class="layout_left">
                        <div class="box_2">
                            <div class="shop_left_lib">
                                <div class="lib_top"><span title="相同尺码的商品">相同尺码的商品</span></div>
                                <div class="lib_mid">
                                    <ul class="listitem">
                                        <li><a href="goods.php-id=1" title="棉麻舒爽休闲长袖衬衫 紫色方格">棉麻舒爽休闲长...</a></li>
                                        <li><a href="goods.php-id=2" title="棉麻舒爽休闲长袖衬衫 湖蓝方格">棉麻舒爽休闲长...</a></li>
                                        <li><a href="goods.php-id=4" title="时尚拼色全棉休闲衬衫 黑色">时尚拼色全棉休...</a></li>
                                        <li><a href="goods.php-id=5" title="休闲舒逸长袖衬衫 白色">休闲舒逸长袖衬...</a></li>
                                        <li><a href="goods.php-id=6" title="双袋全棉休闲衬衫 粉色">双袋全棉休闲衬...</a></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="blank"></div>
                            <div class="shop_left_lib" id="history_div">
                                <div class="lib_top">浏览历史</div>
                                <div class="lib_mid" id="history_list">
                                    <ul class="clearfix"><li class="goodsimg"><a href="goods.php-id=149" target="_blank"><img src="{ATT_URL}/images/201012/thumb_img/149_thumb_G_1291179423603.jpg" alt="珠光按扣休闲衬衫情侣款（男款） 粉色" class="B_blue" /></a></li><li><a href="goods.php-id=149" target="_blank" title="珠光按扣休闲衬衫情侣款（男款） 粉色">珠光按扣休闲衬...</a><br />本店售价：<font class="f1">￥79元</font><br /></li></ul><ul id="clear_history"><a onclick="clear_history()">[清空]</a></ul>
                                </div>
                            </div>
                            <div class="blank"></div>
                            <script type="text/javascript">
                                if (document.getElementById('history_list').innerHTML.replace(/\s/g,'').length<1)
                                {
                                    document.getElementById('history_div').style.display='none';
                                }
                                else
                                {
                                    document.getElementById('history_div').style.display='block';
                                }
                                function clear_history()
                                {
                                    Ajax.call('user.php', 'act=clear_history',clear_history_Response, 'GET', 'TEXT',1,1);
                                }
                                function clear_history_Response(res)
                                {
                                    document.getElementById('history_list').innerHTML = '您已清空最近浏览过的商品';
                                }
                            </script>

                        </div>
                    </div>
                    <div class="layout_right">
                        <div id="ECS_BOUGHT"><div class="shop_right_lib_comm">
                                <div class="innerbox clearfix">
                                    <span class="f_block_title">购买记录<font class="f_2" style="color:#999999; font-weight:normal;">&nbsp;&nbsp;&nbsp;&nbsp;(近期成交数量0)</font></span><br />
                                    <ul class="comments">

                                        还没有人购买过此商品         </ul>


                                    <div id="buy_pagebar" class="f_r" style="margin-top:10px">
                                        <form name="selectPageForm" action="/goods.php" method="get">
                                            <div id="buy_pager">
                                                总计 0 个记录，共 1 页。 <span> <a href="javascript:gotoBuyPage(1,152)">第一页</a> <a href="javascript:;">上一页</a> <a href="javascript:;">下一页</a> <a href="javascript:;">最末页</a> </span>
                                            </div>
                                        </form>
                                        <script type="Text/Javascript" language="JavaScript">
                                            <!--

                                            function selectPage(sel)
                                            {
                                                sel.form.submit();
                                            }

                                            //-->
                                        </script>
                                    </div>

                                    <div class="blank5"></div>
                                </div>
                            </div>
                            <div class="blank5"></div></div>
                        <div id="ECS_COMMENT"> <div class="shop_right_lib_comm">
                                <div class="innerbox clearfix">
                                    <span class="f_block_title">用户评论<font class="f_2" style="color:#999999; font-weight:normal;">&nbsp;&nbsp;&nbsp;&nbsp;(共0条评论)</font></span><br />


                                    <ul class="comments">
                                        <li>暂时还没有任何用户评论</li>
                                    </ul>


                                    <div class="blank"></div>


                                    <div class="blank"></div>
                                    <div class="blank"></div>

                                    <div class="box1" style="padding:20px;">
                                        <form action="javascript:;" onsubmit="submitComment(this)" method="post" name="commentForm" id="commentForm">
                                            <table width="690" border="0" cellspacing="5" cellpadding="0">
                                                <tr>
                                                    <td width="64" align="right">用户名：</td>
                                                    <td width="611">匿名用户</td>
                                                </tr>
                                                <tr>
                                                    <td align="right">E-mail：</td>
                                                    <td>
                                                        <input type="text" name="email" id="email"  maxlength="100" value="" class="txt_style_1"/>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">评价等级：</td>
                                                    <td>
                                                        <style type="text/css">
                                                            <!--
                                                            img {cursor:pointer;}
                                                            -->
                                                        </style>
                                                        <div id="rater">
                                                            <a id="1"><img src="{IMG_URL}/web/rater_star2.gif" alt="" border="0"></a>
                                                            <a id="2"><img src="{IMG_URL}/web/rater_star2.gif" alt="" border="0"></a>
                                                            <a id="3"><img src="{IMG_URL}/web/rater_star2.gif" alt="" border="0"></a>
                                                            <a id="4"><img src="{IMG_URL}/web/rater_star2.gif" alt="" border="0"></a>
                                                            <a id="5"><img src="{IMG_URL}/web/rater_star2.gif" alt="" border="0"></a>
                                                            <input name="starlevel" value="0" id="starlevel" type="hidden">
                                                        </div>
                                                        <script language="javascript" type="text/javascript" src="{JS_URL}/web/rank.js"></script>
                                                        <script language="javascript" type="text/javascript">
                                                            //评论评分
                                                            addEvent();
                                                        </script>
                                                        <div style="display:none;">
                                                            <input name="comment_rank" type="radio" value="1" id="comment_rank1" /> <img src="{IMG_URL}/web/stars1.gif" />
                                                            <input name="comment_rank" type="radio" value="2" id="comment_rank2" /> <img src="{IMG_URL}/web/stars2.gif" />
                                                            <input name="comment_rank" type="radio" value="3" id="comment_rank3" /> <img src="{IMG_URL}/web/stars3.gif" />
                                                            <input name="comment_rank" type="radio" value="4" id="comment_rank4" /> <img src="{IMG_URL}/web/stars4.gif" />
                                                            <input name="comment_rank" type="radio" value="5" checked="checked" id="comment_rank5" /> <img src="{IMG_URL}/web/stars5.gif" />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" valign="top">评论内容：</td>
                                                    <td>
                                                        <textarea id="content" name="content" class="txt_style_1" style="height:50px; width:610px;"></textarea>

                                                        <input type="hidden" name="cmt_type" value="0" />
                                                        <input type="hidden" name="id" value="152" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <div style="padding-left:15px; text-align:left; float:left;">
                                                            验证码：<input type="text" name="captcha"  class="txt_style_1" style="width:50px; margin-left:5px;"/>
                                                            <img src="captcha.php-1021884815" alt="captcha" onClick="this.src='captcha.php-'+Math.random()" align="absmiddle">
                                                        </div>
                                                        <input name="" type="submit"  value="" class="f_r comments_btn">
                                                    </td>
                                                </tr>
                                            </table>
                                        </form>
                                    </div>

                                </div>
                            </div>
                            <div class="blank"></div>
                            <script type="text/javascript">
                                //<![CDATA[
                                var cmt_empty_username = "请输入您的用户名称";
                                var cmt_empty_email = "请输入您的电子邮件地址";
                                var cmt_error_email = "电子邮件地址格式不正确";
                                var cmt_empty_content = "您没有输入评论的内容";
                                var captcha_not_null = "验证码不能为空!";
                                var cmt_invalid_comments = "无效的评论内容!";

                                /**
                                 * 提交评论信息
                                 */
                                function submitComment(frm)
                                {
                                    var cmt = new Object;

                                    //cmt.username        = frm.elements['username'].value;
                                    cmt.email           = frm.elements['email'].value;
                                    cmt.content         = frm.elements['content'].value;
                                    cmt.type            = frm.elements['cmt_type'].value;
                                    cmt.id              = frm.elements['id'].value;
                                    cmt.enabled_captcha = frm.elements['enabled_captcha'] ? frm.elements['enabled_captcha'].value : '0';
                                    cmt.captcha         = frm.elements['captcha'] ? frm.elements['captcha'].value : '';
                                    cmt.rank            = 0;

                                    for (i = 0; i < frm.elements['comment_rank'].length; i++)
                                    {
                                        if (frm.elements['comment_rank'][i].checked)
                                        {
                                            cmt.rank = frm.elements['comment_rank'][i].value;
                                        }
                                    }

                                    //  if (cmt.username.length == 0)
                                    //  {
                                    //     alert(cmt_empty_username);
                                    //     return false;
                                    //  }

                                    if (cmt.email.length > 0)
                                    {
                                        if (!(Utils.isEmail(cmt.email)))
                                        {
                                            alert(cmt_error_email);
                                            return false;
                                        }
                                    }
                                    else
                                    {
                                        alert(cmt_empty_email);
                                        return false;
                                    }

                                    if (cmt.content.length == 0)
                                    {
                                        alert(cmt_empty_content);
                                        return false;
                                    }

                                    if (cmt.enabled_captcha > 0 && cmt.captcha.length == 0 )
                                    {
                                        alert(captcha_not_null);
                                        return false;
                                    }

                                    Ajax.call('comment.php', 'cmt=' + obj2str(cmt), commentResponse, 'POST', 'JSON');
                                    return false;
                                }

                                /**
                                 * 处理提交评论的反馈信息
                                 */
                                function commentResponse(result)
                                {
                                    if (result.message)
                                    {
                                        alert(result.message);
                                    }

                                    if (result.error == 0)
                                    {
                                        var layer = document.getElementById('ECS_COMMENT');

                                        if (layer)
                                        {
                                            layer.innerHTML = result.content;
                                            addEvent();
                                        }
                                    }
                                }

                                //]]>
                            </script></div>
                    </div>
                </div>

<!--{template web/footer.html}-->
